<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('user_operates', function (Blueprint $table) {
            $table->id();
            $table->integer('uid')->default(0)->comment('用户id');
            $table->string('ip')->default('')->comment('用户ip');
            $table->string('title')->default('')->comment('用户操作');
            $table->string('mark')->default('')->comment('附加说明');
            $table->timestamps();
        });
        \DB::statement("ALTER TABLE `shortcuts` comment '用户操作表'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('user_operates');
    }
};
